package com.keyue.controller;

import com.alibaba.fastjson.JSONObject;
import com.keyue.common.annotation.AnonymousAccess;
import com.keyue.common.constant.Constant;
import com.keyue.common.constant.ServerResult;
import com.keyue.common.jsr303.OperateGroup;
import com.keyue.common.utils.RedisUtil;
import com.keyue.domain.vo.HomeImageReqVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 设备信息(EquipmentInfo)表控制层
 *
 * @author makejava
 * @since 2025-07-04 15:20:03
 */
@RestController
@RequestMapping("/keyue/admin/picture")
public class HomePictureController {
    /**
     * 服务对象
     */
    @Resource
    private RedisUtil redisUtil;

    /**
     * 新增
     *
     * @param reqVO 查询条件
     * @return 查询结果
     */
    @AnonymousAccess
    @PostMapping("/add")
    public ServerResult add(@RequestBody @Validated({OperateGroup.List.class}) HomeImageReqVO reqVO) {
        redisUtil.set(Constant.HOME_PICTURE_KEY, JSONObject.toJSONString(reqVO));
        return ServerResult.success();
    }


}

